<script>
export default {
  name: 'dishesForm',
  data() {
    return {
      formData: {
        name: '',
        sort: '',
        type: 1
      },
      formRules: {
        name: [
          { required: true, message: '请输入菜品分类名称', trigger: 'blur' }
        ],
        sort: [
          { required: true, message: '请输入菜品分类排序', trigger: 'blur' }
        ]
      },
      formRef: null
    }
  },
  methods: {
    fetchCategoryDetail(category) {
      this.formData = category
    }
  }
}
</script>

<template>
  <el-form size="small" label-width="100px" :model="formData" :rules="formRules" ref="formRef">
    <el-form-item label="分类名称" prop="name">
      <el-input placeholder="请输入菜品分类名称" v-model="formData.name"></el-input>
    </el-form-item>
    <el-form-item label="分类排序" prop="sort">
      <el-input placeholder="请输入菜品分类排序" v-model="formData.sort"></el-input>
    </el-form-item>
  </el-form>
</template>

<style scoped lang="scss">

</style>
